
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>主页</title>
	<link rel="stylesheet" type="text/css" href="lib/ligerUI1.0.2/skins/Aqua/css/ligerui-all.css">
	<style type="text/css">
        body{ padding:0; margin:0; background:#E5EDEF;}
    </style>
	<script type="text/javascript" src="lib/jquery/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="lib/ligerUI1.0.2/js/ligerui.min.js"></script>
	
 
	<script type="text/javascript">
		var liftWidth = 180;
		var rightWidth = 0;
		var data = new Array();
		
		function initMenu(){
			data.push({ text: '基础', treelevel: 1, isleaf: 0 });
			data.push({ text: '树', treelevel: 2, isleaf: 1, tabid: 'tree', url: 'http://www.baidu.com' });
			data.push({ text: '弹出框', treelevel: 2, isleaf: 1, tabid: 'showmessage', url: 'demos/base/messagebox.htm' });
			data.push({ text: '改变大小', treelevel: 2, isleaf: 1, tabid: 'resize', url: 'demos/base/resizable.html' });
			data.push({ text: '拖动', treelevel: 2, isleaf: 1, tabid: 'drag', url: 'demos/base/drag.html' });
			data.push({ text: '拖动并改变大小', treelevel: 2, isleaf: 1, tabid: 'dragresize', url: 'demos/base/dragresizable.html' }); 
			data.push({ text: '表单', treelevel: 1, isleaf: 0 });
			data.push({ text: '复选框', treelevel: 2, isleaf: 1, tabid: 'checkbox', url: 'demos/form/checkbox.htm' });
			data.push({ text: '单选框', treelevel: 2, isleaf: 1, tabid: 'radio', url: 'demos/form/radio.htm' });
			data.push({ text: '调整器', treelevel: 2, isleaf: 1, tabid: 'spinner', url: 'demos/form/spinner.htm?20110313' });
			data.push({ text: '日期', treelevel: 2, isleaf: 1, tabid: 'dateEditor', url: 'demos/form/dateEditor.htm' });
			data.push({ text: '下拉框', treelevel: 2, isleaf: 1, tabid: 'comboBox', url: 'demos/form/comboBox.htm' });
			data.push({ text: '文本框', treelevel: 2, isleaf: 1, tabid: 'textbox', url: 'demos/form/textbox.htm' });
			data.push({ text: '综合', treelevel: 2, isleaf: 1, tabid: 'form', url: 'demos/form/form.htm' });
			             
			$("#menu1").ligerTree({
			    data: data,
			    callback: function (item) {
			        if (!item.url || !item.tabid) return;
			        f_addTabItem(item.tabid, item.url,item.text);
			    }
			});
		}
		function f_addTabItem(tabid, url, text){
			$("body")[0].manager.addTabItem(tabid, url, text);
		}
		$(function (){
		    initMenu();
		    $.ligerFrame({ tabItems: [{ tabid: 'home', url: 'http://www.baidu.com', text: '我的主页', showClose: false}],
		        leftHeader: '主菜单'
		    }); 
		});  
		function f_closeWindow(frame){ 
		    for (var i = 0; i < document.frames.length; i++)
		    {
		        if (document.frames[i] == frame)
		        { 
		            $(".l-window[framename=" + document.frames[i].name + "]").remove();
		            return;
		        }
		    }
		}
		function f_openWindow(url, title,width, height){
		    return $.ligerWindow.show({ width: width, height: height, left: 100, top: 100, title: title, url: url });
		}
		function f_open(url){
		    $.ligerWindow.show({ width: 300, height: 300,left:100,top:100, title: '我的标题', url: url });
		}
		function f_openWithContent(content){
		    var chtml = "<div style='padding:10px'>" + content + "</div>";
		    $.ligerWindow.show({ width: 300, height: 300, left: 200, top: 200, title: '我的标题', content: chtml });
		}
	</script>
  </head>
  
  <body>
    <div class="l-frame-top">
	    <div class="l-frame-top-logo">
	        <p>Lambor框架</p>
	    </div>
	</div>
	<div class="l-frame-main">
	    <div class="l-frame-left"> 
	         <div class="l-frame-left-content">
	             <div title="功能列表">
	             	<div id="menu1" style="padding:3px;"></div>
	             </div> 
	             <div title="打开窗口">
	                    <ul>
	                        <li><a href="javascript:f_open('welcome.htm')">窗口一</a></li>
	                        <li><a href="javascript:f_openWithContent('这是内容')">窗口二</a></li>
	                        <li><a href="javascript:f_open('demos/layout/layout2.htm')">窗口三</a></li>
	                    </ul>
	            </div>
	         </div>
	    </div>
	</div>
	<div class="l-frame-footer">
		Copyright © 2011 Lambor
	</div>
  </body>
</html>
